﻿using System;

namespace WebAPI.Entities;

public class Comment
{
    private string id;
    private string user_id;
    private string article_id;
    private string father_id;
    private string content;
    private string star;
    private string create_time;
    private string update_time;

    public Comment()
    {
    }

    public Comment(string id, string userId, string articleId, string fatherId, string content, string star, string createTime, string updateTime)
    {
        this.id = id;
        user_id = userId;
        article_id = articleId;
        father_id = fatherId;
        this.content = content;
        this.star = star;
        create_time = createTime;
        update_time = updateTime;
    }

    public string Id
    {
        get => id;
        set => id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string UserId
    {
        get => user_id;
        set => user_id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string ArticleId
    {
        get => article_id;
        set => article_id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string FatherId
    {
        get => father_id;
        set => father_id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Content
    {
        get => content;
        set => content = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Star
    {
        get => star;
        set => star = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string CreateTime
    {
        get => create_time;
        set => create_time = value;
    }

    public string UpdateTime
    {
        get => update_time;
        set => update_time = value;
    }
}